<include file="header"/>

<div ng-controller="UserRegisterController" id="b-register">
    <div class="wrap">
        <div class="box">
            <div class="head">
                <h1>用户注册</h1>
            </div>
            <div class="body">
                <form ng-submit="submit(form.$valid)" novalidate name="form">
                    <div class="form-group"
                         ng-class="{'has-error':!form.username.$pristine && form.username.$invalid && !form.username.$focused}">
                        <label for="username">用户</label>
                        <input type="text"
                               class="form-control"
                               id="username"
                               name="username"
                               ng-model="data.username"
                               required="true"
                               tabindex="1"
                               ng-focus/>
                    </div>
                    <div class="form-group"
                         ng-class="{'has-error':!form.password.$pristine && form.password.$invalid && !form.password.$focused}">
                        <label for="password">密码</label>
                        <input type="password"
                               class="form-control"
                               id="password"
                               name="password"
                               ng-model="data.password"
                               ng-minlength="6"
                               required="true"
                               tabindex="2"
                               ng-focus/>
                    </div>
                    <div class="form-group"
                         ng-class="{'has-error':!form['password-repeat'].$pristine && form['password-repeat'].$invalid && !form['password-repeat'].$focused}">
                        <label for="password-repeat">重复密码</label>
                        <input type="password"
                               class="form-control"
                               id="password-repeat"
                               name="password-repeat"
                               ng-model="data['password-repeat']"
                               ng-minlength="6"
                               required="true"
                               ng-focus
                               tabindex="3"
                               ng-equal="password"/>
                    </div>
                    <button type="submit" class="btn btn-primary btn-block" ng-disabled="form.$invalid" tabindex="4">
                        注册
                    </button>
                </form>
            </div>
        </div>
    </div>
</div>

<include file="icons"/>

<include file="footer"/>